package com.second.oa.web.servlet;


import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.second.oa.domain.Employee;
import com.second.oa.web.vo.EmailVo;

/**
 * 写新邮件
 * @author 黎杰 
 *
 */
public class NewMsgServlet extends HttpServlet {

	@Override
	protected void service(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		//获取session
		HttpSession session = request.getSession();
		//获取当前登录的发送者
		Employee sender = (Employee) session.getAttribute("current");
		//获取邮件名字
		String title = request.getParameter("title");
		//获取收件者工号
		String empno = request.getParameter("empno");
		//获取邮件概括
		String tags = request.getParameter("tags");
		//获取邮件内容
		String content = request.getParameter("content");
		//封装以及设置未读状态码
		EmailVo emailVo = new EmailVo(sender, title, tags, empno, content,0);
		//测试
		System.out.println(title+":"+empno+":"+tags+":"+content+":"+sender);
		
	}
	
}
